/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO

Authors: Nitay Megides
		 Rachel Banino

Project: Exercise 3

Using:	hw_code\Hw3Types.h
		hw_code\Bmp24LineReader.h
		
Description:
Loader is basically a thread that loads the picture. It loads it row by row,
notifying the Locator threads (by event) on every row it reads. After reading 
each row, Loader converts the row to grayscale, then "publishes" it.

oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

#ifndef LOADER_H
#define LOADER_H


#include "hw_code\Hw3Types.h"
#include "hw_code\Bmp24LineReader.h"


// The struct that the thread receives as the threadfunc parameter
typedef struct 
{
	Bmp24LineReader LineReader;
} TLoaderInformation;
typedef TLoaderInformation* PLoaderInformation;

/* LoaderInitialize(Bmp24LineReader reader)
 * -----------------------------------
 * Initializes the Loader
 * 
 * reader - A reader to load the picture from						*/
BOOL LoaderInitialize(Bmp24LineReader reader);

/* LoaderFree()
 * -----------------------------------
 * Frees the loader and its resources (Waits for the loader thread 
 * to finish)														*/
void LoaderFree();

/* LoaderStartLoading()
 * -----------------------------------
 * Start the loading process										*/
BOOL LoaderStartLoading();


#endif // LOADER_H